#ifndef RENDER_H
#define RENDER_H

#include <stdio.h>
#include "engine.h"
#include "entity.h"
#include "main.h"
#include "vga.h"

extern char drawparty;
extern char cameratracking;
extern char drawentities;
extern char layer0;
extern char layer1;
extern char layervc;
extern char layervc2;
extern char layervcwrite;
extern unsigned char* vcscreen;
extern unsigned char* vcscreen1;
extern unsigned char* vcscreen2;
extern unsigned char hookretrace;
extern char flipped[2048];
extern int tileidx[2048];
extern int vspspeed;
extern unsigned char* vspmask;
extern int foregroundlock;
extern int xwin1;
extern int ywin1;
extern unsigned char draworder[100];
extern unsigned char numdraw;
extern unsigned char layer1trans;
extern unsigned char layervctrans;
extern unsigned char layervc2trans;

extern int quake;
extern int quakex;
extern int quakey;
extern int qswitch;
extern int screengradient;
extern void (*DrawLayer1)(int xw, int yw);

extern void InitRenderSystem();
extern void CalcVSPMask();
extern void drawchar(int i, int xw, int yw);
extern void SwitchOrder(int i, int j);
extern void SortDrawOrder();
extern void setdrawchar(unsigned char i);
extern void drawcharacters(int xw,int yw);
extern void drawchars(int xw, int yw);
extern void ProcessEarthQuake();
extern void drawvclayer();
extern void drawmap();
extern void drawmaploc(int xw, int yw);
extern void DrawLayer0(int xw, int yw);
extern void DrawLayer1Trans(int xw, int yw);
extern void _DrawLayer1Trans(int xw, int yw);
extern void DrawLayer1NoSpeed(int xw, int yw);
extern void DrawLayer1Speed(int xw, int yw);

extern void AnimateTile(int i, int l);
extern void animate(int i);

#endif
